package com.ruoyi.exa.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exa.mapper.ExaBitchMapper;
import com.ruoyi.exa.domain.ExaBitch;
import com.ruoyi.exa.service.IExaBitchService;

/**
 * 考试批次Service业务层处理
 * 
 * @author linziheng
 * @date 2025-06-13
 */
@Service
public class ExaBitchServiceImpl implements IExaBitchService 
{
    @Autowired
    private ExaBitchMapper exaBitchMapper;

    /**
     * 查询考试批次
     * 
     * @param id 考试批次主键
     * @return 考试批次
     */
    @Override
    public ExaBitch selectExaBitchById(Long id)
    {
        return exaBitchMapper.selectExaBitchById(id);
    }

    /**
     * 查询考试批次列表
     * 
     * @param exaBitch 考试批次
     * @return 考试批次
     */
    @Override
    public List<ExaBitch> selectExaBitchList(ExaBitch exaBitch)
    {
        return exaBitchMapper.selectExaBitchList(exaBitch);
    }

    /**
     * 新增考试批次
     * 
     * @param exaBitch 考试批次
     * @return 结果
     */
    @Override
    public int insertExaBitch(ExaBitch exaBitch)
    {
        exaBitch.setCreateTime(DateUtils.getNowDate());
        return exaBitchMapper.insertExaBitch(exaBitch);
    }

    /**
     * 修改考试批次
     * 
     * @param exaBitch 考试批次
     * @return 结果
     */
    @Override
    public int updateExaBitch(ExaBitch exaBitch)
    {
        exaBitch.setUpdateTime(DateUtils.getNowDate());
        return exaBitchMapper.updateExaBitch(exaBitch);
    }

    /**
     * 批量删除考试批次
     * 
     * @param ids 需要删除的考试批次主键
     * @return 结果
     */
    @Override
    public int deleteExaBitchByIds(Long[] ids)
    {
        return exaBitchMapper.deleteExaBitchByIds(ids);
    }

    /**
     * 删除考试批次信息
     * 
     * @param id 考试批次主键
     * @return 结果
     */
    @Override
    public int deleteExaBitchById(Long id)
    {
        return exaBitchMapper.deleteExaBitchById(id);
    }
}
